<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.0.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.0.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.0.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.0.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.0.0" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta property="og:type" content="website">
<meta property="og:title" content="categories">
<meta property="og:url" content="http://yoursite.com/categories/index.html">
<meta property="og:site_name" content="hill&#39;s blog">
<meta property="og:locale" content="cn">
<meta property="article:published_time" content="2017-07-10T08:36:26.000Z">
<meta property="article:modified_time" content="2021-02-25T04:04:48.836Z">
<meta property="article:author" content="heyaojia">
<meta name="twitter:card" content="summary">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '6.0.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/categories/"/>





  <title> | hill's blog</title>
  








<meta name="generator" content="Hexo 4.2.1"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="cn">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"> <div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">hill's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-question-circle"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    
    
    
    <div class="post-block page">
      <header class="post-header">

	<h1 class="post-title" itemprop="name headline"></h1>



</header>

      
      
      
      <div class="post-body">
        
        
          <h3 id="Mysql-学习"><a href="#Mysql-学习" class="headerlink" title="Mysql-学习"></a>Mysql-学习</h3><hr>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">知行合一、学习了sql用法，总结一些知识点</span><br></pre></td></tr></table></figure>

<h4 id="开始"><a href="#开始" class="headerlink" title="开始"></a>开始</h4><ul>
<li><p>Sql语句 -&gt;</p>
<p>DDL：操作数据库语句</p>
<p>DML：操作表的CRUD</p>
<p>DCL：用户及权限</p>
</li>
</ul>
<hr>
<h4 id="一、Mysql知识点"><a href="#一、Mysql知识点" class="headerlink" title="一、Mysql知识点"></a>一、Mysql知识点</h4><h4 id="1-存储引擎"><a href="#1-存储引擎" class="headerlink" title="1. 存储引擎"></a>1. 存储引擎</h4><h5 id="MyISAM："><a href="#MyISAM：" class="headerlink" title="MyISAM："></a>MyISAM：</h5><p>查询快</p>
<ol>
<li>查询速度快</li>
<li>只支持表锁</li>
<li>不支持事务</li>
<li>无法容灾（待确认）</li>
</ol>
<p>InnoDB：</p>
<ol>
<li>整体速度快</li>
<li>只支持表锁</li>
<li>支持事物</li>
</ol>
<p>(…待补充):</p>
<p>​    1. </p>
<h5 id="2-事务"><a href="#2-事务" class="headerlink" title="2. 事务"></a>2. 事务</h5><p>​    </p>
<h5 id="3-ACID"><a href="#3-ACID" class="headerlink" title="3. ACID"></a>3. ACID</h5><p>​    1、原子性</p>
<p>​    2、一致性</p>
<p>​    3、隔离性</p>
<p>​    4、持久性</p>
<h5 id="4-索引"><a href="#4-索引" class="headerlink" title="4. 索引"></a>4. 索引</h5><ol>
<li><p>原理 -&gt;</p>
<p>原理是B数和B+数， 详情见原理</p>
</li>
<li><p>索引的类型</p>
<ol>
<li>唯一索引</li>
<li>xxx</li>
</ol>
</li>
<li><p>索引的命中</p>
<pre><code>1. 
 2. </code></pre></li>
</ol>
<h5 id="5-分库分表"><a href="#5-分库分表" class="headerlink" title="5. 分库分表"></a>5. 分库分表</h5><ol>
<li></li>
</ol>
<h5 id="6-SQL注入"><a href="#6-SQL注入" class="headerlink" title="6. SQL注入"></a>6. SQL注入</h5><h5 id="7-MySql主从"><a href="#7-MySql主从" class="headerlink" title="7. MySql主从"></a>7. MySql主从</h5><h5 id="8-Mysql读写分离"><a href="#8-Mysql读写分离" class="headerlink" title="8. Mysql读写分离"></a>8. Mysql读写分离</h5><h4 id="二、Go连接Mysql"><a href="#二、Go连接Mysql" class="headerlink" title="二、Go连接Mysql"></a>二、Go连接Mysql</h4><h4 id="三、Mysql架构-amp-amp-实现原理"><a href="#三、Mysql架构-amp-amp-实现原理" class="headerlink" title="三、Mysql架构&amp;&amp;实现原理"></a>三、Mysql架构&amp;&amp;实现原理</h4><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/kity@2.0.4/dist/kity.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/kityminder-core@1.4.50/dist/kityminder.core.min.js"></script><script defer="true" type="text/javascript" src="https://cdn.jsdelivr.net/npm/hexo-simple-mindmap@0.2.0/dist/mindmap.min.js"></script><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/hexo-simple-mindmap@0.2.0/dist/mindmap.min.css">
        
      </div>
      
      
      
    </div>
    
    
    
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">heyaojia</p>
              <p class="site-description motion-element" itemprop="description">游戏行业的一枚小鲜肉</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives">
              
                  <span class="site-state-item-count">21</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">5</span>
                  <span class="site-state-item-name">categories</span>
                </a>
              </div>
            

            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="git@gitee.com:hillcool/hillcool.git" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-gitee"></i>GitHub</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#Mysql-学习"><span class="nav-number">1.</span> <span class="nav-text">Mysql-学习</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#开始"><span class="nav-number">1.1.</span> <span class="nav-text">开始</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#一、Mysql知识点"><span class="nav-number">1.2.</span> <span class="nav-text">一、Mysql知识点</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-存储引擎"><span class="nav-number">1.3.</span> <span class="nav-text">1. 存储引擎</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#MyISAM："><span class="nav-number">1.3.1.</span> <span class="nav-text">MyISAM：</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#2-事务"><span class="nav-number">1.3.2.</span> <span class="nav-text">2. 事务</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#3-ACID"><span class="nav-number">1.3.3.</span> <span class="nav-text">3. ACID</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#4-索引"><span class="nav-number">1.3.4.</span> <span class="nav-text">4. 索引</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#5-分库分表"><span class="nav-number">1.3.5.</span> <span class="nav-text">5. 分库分表</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#6-SQL注入"><span class="nav-number">1.3.6.</span> <span class="nav-text">6. SQL注入</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#7-MySql主从"><span class="nav-number">1.3.7.</span> <span class="nav-text">7. MySql主从</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#8-Mysql读写分离"><span class="nav-number">1.3.8.</span> <span class="nav-text">8. Mysql读写分离</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#二、Go连接Mysql"><span class="nav-number">1.4.</span> <span class="nav-text">二、Go连接Mysql</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#三、Mysql架构-amp-amp-实现原理"><span class="nav-number">1.5.</span> <span class="nav-text">三、Mysql架构&amp;&amp;实现原理</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">heyaojia</span>

  

  
</div>









        







        
      </div>
    </footer>

    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>
























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.0.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.0.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.0.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.0.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.0.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.0.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.0.0"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
